<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="dto.LeaveDTO" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>JSTL Demo</title>
</head>
<body>
<%@ include file="head.jsp"%>
<form action="./viewdetail" method="post">

<h2>Leave History</h2>
<table>

<tr><td>Application Date</td>
<td>Leave Type</td>
<td>Start Date</td>
<td>End  Date</td>
<td>Status</td></tr>



<c:forEach items="${requestScope.LeaveInfo}" var="Leave">
<tr><td>${Leave._applicationDate}</td>
<td>${Leave._leaveType}</td>
<td>${Leave._startDate}</td>
<td>${Leave._endDate}</td>
<td>${Leave._status}</td>
 <td>

 	<c:url var="empUrl" value="/staffDetailPreset">
 		<c:param name="LeaveID" value='${Leave._leaveID} '/>
 	</c:url>
  <a href="${empUrl} ">Detail</a>	
 </td>
 </tr>
</c:forEach>





			
</table>
</form>
</body>
</html>